program Task3_1;

{$APPTYPE CONSOLE}

var
  n: Int64;
begin
  assign(input, 'input.txt'); reset(input); assign(output, 'output.txt');  rewrite(output); read(n);
  if ((n mod 5) <> 0) or (n<0) then write('ERROR') else  write(n*n);
end.

